<%@tag pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="custom" tagdir="/WEB-INF/tags" %>
<%@attribute name="list" required="true" type="java.util.List" %>
<%@attribute name="index" required="true" type="java.lang.Integer" %>
<%@attribute name="name" required="false" type="java.lang.String" %>

<c:forEach items="${list}" var="item" varStatus="status">
    <input type="hidden" name="${name}childDept[${status.index}].uuid" value="${item.uuid}"/>
    <input type="hidden" name="${name}childDept[${status.index}].name" value="${item.name}"/>
    <input type="hidden" name="${name}childDept[${status.index}].parentUuid" value="${item.parentUuid}"/>
    <custom:dept_tree_input_list list="${item.childDept}" index="${index+1}"
                                 name="${name}childDept[${status.index}]."/>
</c:forEach>

